﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TimberSmart.Model.Common;

namespace TimberSmart.Model.Security
{
    [Table("User")]
    public class User : Person
    {
        [Required, MaxLength(32)]
        public string Username { get; set; }

        [Required, MaxLength(64)]
        public byte[] PasswordHash { get; set; }

        [Required, MaxLength(64)]
        public byte[] PasswordSalt { get; set; }

        public byte[] LastIPAddress { get; set; }

        //public int? PersonID { get; set; }
        public virtual Person Person { get; set; }

        public virtual ICollection<Role> Roles { get; set; }


    }
}
